package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.BusinessOrderSubMapper;
import com.ktgj.customer.domain.BusinessOrderSub;
import com.ktgj.customer.service.IBusinessOrderSubService;

/**
 * 订单子Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
@Service
public class BusinessOrderSubServiceImpl implements IBusinessOrderSubService 
{
    @Autowired
    private BusinessOrderSubMapper businessOrderSubMapper;

    /**
     * 查询订单子
     * 
     * @param orderSubId 订单子ID
     * @return 订单子
     */
    @Override
    public BusinessOrderSub selectBusinessOrderSubById(Long orderSubId)
    {
        return businessOrderSubMapper.selectBusinessOrderSubById(orderSubId);
    }

    /**
     * 查询订单子列表
     * 
     * @param businessOrderSub 订单子
     * @return 订单子
     */
    @Override
    public List<BusinessOrderSub> selectBusinessOrderSubList(BusinessOrderSub businessOrderSub)
    {
        return businessOrderSubMapper.selectBusinessOrderSubList(businessOrderSub);
    }

    /**
     * 新增订单子
     * 
     * @param businessOrderSub 订单子
     * @return 结果
     */
    @Override
    public int insertBusinessOrderSub(BusinessOrderSub businessOrderSub)
    {
        businessOrderSub.setCreateTime(DateUtils.getNowDate());
        return businessOrderSubMapper.insertBusinessOrderSub(businessOrderSub);
    }

    /**
     * 修改订单子
     * 
     * @param businessOrderSub 订单子
     * @return 结果
     */
    @Override
    public int updateBusinessOrderSub(BusinessOrderSub businessOrderSub)
    {
        return businessOrderSubMapper.updateBusinessOrderSub(businessOrderSub);
    }

    /**
     * 批量删除订单子
     * 
     * @param orderSubIds 需要删除的订单子ID
     * @return 结果
     */
    @Override
    public int deleteBusinessOrderSubByIds(Long[] orderSubIds)
    {
        return businessOrderSubMapper.deleteBusinessOrderSubByIds(orderSubIds);
    }

    /**
     * 删除订单子信息
     * 
     * @param orderSubId 订单子ID
     * @return 结果
     */
    @Override
    public int deleteBusinessOrderSubById(Long orderSubId)
    {
        return businessOrderSubMapper.deleteBusinessOrderSubById(orderSubId);
    }
}
